package edu.byu.intex2.data.bo;

import edu.byu.intex2.data.DataException;
import edu.byu.intex2.data.dao.ManufacturerDAO;

/**
 * @author Jason Whiting
 */
public class Manufacturer extends BusinessObject
{

    private String name;
    private String email;

    /**
     * Creates a new instance of BusinessObject
     * @param id
     */
    public Manufacturer(String id)
    {
        super(id);
    }//constructor

    //Quick Access Method
    public void save() throws DataException
    {
        try
        {
            ManufacturerDAO.getInstance().save(this);
        } catch (DataException e)
        {
            e.printStackTrace();
        }
    }

    /**
     * @return the costOfLabor
     */
    public String getName()
    {
        return name;
    }

    /**
     * @param costOfLabor the costOfLabor to set
     */
    public void setName(String name)
    {
        this.name = name;
        this.setDirty();
    }

    /**
     * @return the costOfParts
     */
    public String getEmail()
    {
        return email;
    }

    /**
     * @param costOfLabor the costOfLabor to set
     */
    public void setEmail(String email)
    {
        this.email = email;
        this.setDirty();
    }
}
